/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qdu.servlet;

import com.qdu.dao.UsersDao;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 修改等级
 *
 * @author Lenovo
 */
@WebServlet("/mls")
public class modifyLevelServlet extends HttpServlet{

    UsersDao userdao=new UsersDao();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String id=req.getParameter("id");
        int level=Integer.parseInt(req.getParameter("level"));
        System.out.println(level);
        System.out.println(id);
        int rows=userdao.modifyUserLevel(id,level);
        System.out.println(rows);
        req.getRequestDispatcher("saus").forward(req, resp);
    }

}
